export default class ViewerInitConfig {
    #defaultConfig;
    #otherConfig;

    constructor() {
        this.#defaultConfig = {
            // animation widgets to control 
            animation: false,
            // pick the default map service or terrain service
            baseLayerPicker: false,
            // find position tools based on bing map
            geocoder: false,
            // turn to default camera position button
            homeButton: false,
            // 3d, 2d tranfer tool button
            sceneModePicker: false,
            // use to show time and can skip time
            timeline: false,
            fullscreenButton: false,
            navigationHelpButton: false,
            // show tileset info as a dialog
            infoBox: false,
        };
        this.#otherConfig = {};
    }

    extendDefaultConfig(otherConfig) {
        if (otherConfig && otherConfig != null && typeof otherConfig === 'object') {
            // record, combine and return the newest config object
            this.#otherConfig = {...this.#otherConfig, ...otherConfig};
            return {...this.#defaultConfig, ...this.#otherConfig};
        }
        return this.#defaultConfig;
    }

    getDefaultConfig() {
        return this.#defaultConfig;
    }

    getExtendConfig() {
        return this.#otherConfig;
    }
}